package domain.entities;

import javax.persistence.*;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Advancedfinalstudyreports entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "advancedfinalstudyreports", catalog = "bms")
public class Advancedfinalstudyreports implements java.io.Serializable {

	// Fields

	private Integer id;
	private ProtocoloCentro protocoloCentro;
	private Date dateReceivedBms;
	private Date dateSentToSite;
	private Date deadline;
    private boolean fefym;
    private Date formCompleto;
    private Date receivedExternalEc;
	private Date receivedLocalEc;
	private Date receivedTeachingC;
	private String report;
	private Date submissionCcis;
    private Date submissionExternalEc;
	private Date submissionLocalEc;
	private Date submissionMoh;
	private Date submissionTeachingC;
    private Integer scope;


    public static final String CLASSTITLE = "Advanced and Final Study Reports ";
    public static final LinkedHashMap<String, String> TITULOS = new LinkedHashMap<String, String>(
            Collections.unmodifiableMap(
                    new LinkedHashMap<String, String>() {
                        {
                            put("report", "Report");
                            put("deadline", "Deadline");
                            put("dateSentToSite", "Date Sent to Site");
                            put("dateReceivedBms", "Date Received at BMS");
                            put("submissionExternalEc", "Submission External EC");
                            put("receivedExternalEc", "Received by External EC (stamped)");
                            put("submissionLocalEc", "Submission to Local EC (stamped)");
                            put("submissionTeachingC", "Submission to Teaching Committee");
                            put("receivedTeachingC", "Received Teaching Committee");
                            put("submissionCcis", "Submission to CCIS");
                            put("formCompleto", "Form completo para enviar a ANMAT y para cierre Hoja firmada por PI");
                            put("submissionMoh", "Submission MOH - Annualy except for CN ( each 6 months)");
                        }
                    }
            )
    );

	// Constructors

	/** default constructor */
	public Advancedfinalstudyreports() {
	}

	/** minimal constructor */
	public Advancedfinalstudyreports(ProtocoloCentro protocoloCentro) {
		this.protocoloCentro = protocoloCentro;
	}

	/** full constructor */
	public Advancedfinalstudyreports(ProtocoloCentro protocoloCentro,
			Date dateReceivedBms, Date dateSentToSite, Date deadline,
			boolean fefym, Date receivedExternalEc, Date receivedLocalEc,
			Date receivedTeachingC, String report, Date submissionCcis,
			Date submissionExternalEc,
			Date submissionLocalEc, Date submissionMoh,
			Date submissionTeachingC) {
		this.protocoloCentro = protocoloCentro;
		this.dateReceivedBms = dateReceivedBms;
		this.dateSentToSite = dateSentToSite;
		this.deadline = deadline;
		this.fefym = fefym;
		this.receivedExternalEc = receivedExternalEc;
		this.receivedLocalEc = receivedLocalEc;
		this.receivedTeachingC = receivedTeachingC;
		this.report = report;
		this.submissionCcis = submissionCcis;
        this.submissionExternalEc = submissionExternalEc;
		this.submissionLocalEc = submissionLocalEc;
		this.submissionMoh = submissionMoh;
		this.submissionTeachingC = submissionTeachingC;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "PROTOCOLO_CENTROCENTROid", referencedColumnName = "CENTROid", nullable = false),
			@JoinColumn(name = "protocolo_centroprotocolo_compromisopaisprotocoloid", referencedColumnName = "protocolo_compromisopaisprotocoloid", nullable = false),
			@JoinColumn(name = "protocolo_centroprotocolo_compromisopaiscompromisopaisid", referencedColumnName = "protocolo_compromisopaiscompromisopaisid", nullable = false) })
	public ProtocoloCentro getProtocoloCentro() {
		return this.protocoloCentro;
	}

	public void setProtocoloCentro(ProtocoloCentro protocoloCentro) {
		this.protocoloCentro = protocoloCentro;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "dateReceivedBMS", length = 10)
	public Date getDateReceivedBms() {
		return this.dateReceivedBms;
	}

	public void setDateReceivedBms(Date dateReceivedBms) {
		this.dateReceivedBms = dateReceivedBms;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "dateSentToSite", length = 10)
	public Date getDateSentToSite() {
		return this.dateSentToSite;
	}

	public void setDateSentToSite(Date dateSentToSite) {
		this.dateSentToSite = dateSentToSite;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "deadline", length = 10)
	public Date getDeadline() {
		return this.deadline;
	}

	public void setDeadline(Date deadline) {
		this.deadline = deadline;
	}

	@Column(name = "fefym")
	public boolean getFefym() {
		return this.fefym;
	}

	public void setFefym(boolean fefym) {
		this.fefym = fefym;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "receivedExternalEC", length = 10)
	public Date getReceivedExternalEc() {
		return this.receivedExternalEc;
	}

	public void setReceivedExternalEc(Date receivedExternalEc) {
		this.receivedExternalEc = receivedExternalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "receivedLocalEC", length = 10)
	public Date getReceivedLocalEc() {
		return this.receivedLocalEc;
	}

	public void setReceivedLocalEc(Date receivedLocalEc) {
		this.receivedLocalEc = receivedLocalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "receivedTeachingC", length = 10)
	public Date getReceivedTeachingC() {
		return this.receivedTeachingC;
	}

	public void setReceivedTeachingC(Date receivedTeachingC) {
		this.receivedTeachingC = receivedTeachingC;
	}

	@Column(name = "report")
	public String getReport() {
		return this.report;
	}

	public void setReport(String report) {
		this.report = report;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "submissionCCIS", length = 10)
	public Date getSubmissionCcis() {
		return this.submissionCcis;
	}

	public void setSubmissionCcis(Date submissionCcis) {
		this.submissionCcis = submissionCcis;
	}

    @Temporal(TemporalType.DATE)
	@Column(name = "submissionExternalEC", length = 10)
	public Date getSubmissionExternalEc() {
		return this.submissionExternalEc;
	}

	public void setSubmissionExternalEc(Date submissionExternalEc) {
		this.submissionExternalEc = submissionExternalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "submissionLocalEC", length = 10)
	public Date getSubmissionLocalEc() {
		return this.submissionLocalEc;
	}

	public void setSubmissionLocalEc(Date submissionLocalEc) {
		this.submissionLocalEc = submissionLocalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "submissionMOH6", length = 10)
	public Date getSubmissionMoh() {
		return this.submissionMoh;
	}

	public void setSubmissionMoh(Date submissionMoh) {
		this.submissionMoh = submissionMoh;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "submissionTeachingC", length = 10)
	public Date getSubmissionTeachingC() {
		return this.submissionTeachingC;
	}

	public void setSubmissionTeachingC(Date submissionTeachingC) {
		this.submissionTeachingC = submissionTeachingC;
	}

    @Temporal(TemporalType.DATE)
    @Column(name = "formCompleto", length = 10)
    public Date getFormCompleto() {
        return formCompleto;
    }

    public void setFormCompleto(Date formCompleto) {
        this.formCompleto = formCompleto;
    }

    @Column(name = "scope")
    public Integer getScope() {
        return scope;
    }

    public void setScope(Integer scope) {
        this.scope = scope;
    }
}